package com.hc.comm.Service;

import java.util.Comparator;

import com.hc.bean.GradeBean;

public class ComparatorGradeBeanl  implements Comparator{

	@Override
	public int compare(Object o1, Object o2) {
	GradeBean bean1 = 	(GradeBean) o1;
	GradeBean bean2 = 	(GradeBean) o2;
	
	int flag =  (int) ((bean2.getDownFileGrade()+bean2.getWebGrade()) -(bean1.getDownFileGrade()+bean1.getWebGrade()));
	
	
	if(flag==0){
		
		return 0;
	}else{
		
		return flag;
	}
		
	}

}
